/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package merlion.frm.bpm.pojo;

import java.sql.Timestamp;
import merlion.frm.bpm.entity.Invoice;
import merlion.frm.bpm.entity.SupplierInvoice;

/**
 *
 * @author Kenn
 */
public class FutureTransaction {
    
    private Invoice invoice;
    private SupplierInvoice supplierInvoice;
    private String transactionType;
    private String companyName;
    private Timestamp transactionDate; // future transaction date
    private Double cashCredit;
    private Double cashDebit;
    private Double receivableCredit;
    private Double receivableDebit;
    private Double payableCredit;
    private Double payableDebit;
    
    public FutureTransaction(){
        
    }
    
    public FutureTransaction(Invoice invoice){
        this.transactionType = "Customer Receivable in Future";
        //this.companyName = invoice.getCustomer().getCompanyName();
        this.invoice = invoice;
        this.transactionDate = invoice.getInvoiceDueDate();        
        
        receivableCredit = invoice.getTotal();
        cashDebit = invoice.getTotal();
    }
    
    public FutureTransaction(SupplierInvoice si){
        this.transactionType = "Supplier Payable in Future";
        //this.companyName = si.getSupplier().getSupplierName();
        this.supplierInvoice = si;
        this.transactionDate = si.getInvoiceDueDate();
        
        payableDebit = si.getInvoiceAmount();
        cashCredit = si.getInvoiceAmount();
        System.out.println("Future tranasction at supplier invoice: " + si.getInvoiceAmount());
    }

    public Invoice getInvoice() {
        return invoice;
    }

    public void setInvoice(Invoice invoice) {
        this.invoice = invoice;
    }

    public SupplierInvoice getSupplierInvoice() {
        return supplierInvoice;
    }

    public void setSupplierInvoice(SupplierInvoice supplierInvoice) {
        this.supplierInvoice = supplierInvoice;
    }

    public String getTransactionType() {
        return transactionType;
    }

    public void setTransactionType(String transactionType) {
        this.transactionType = transactionType;
    }

    public Double getCashCredit() {
        return cashCredit;
    }

    public void setCashCredit(Double cashCredit) {
        this.cashCredit = cashCredit;
    }

    public Double getCashDebit() {
        return cashDebit;
    }

    public void setCashDebit(Double cashDebit) {
        this.cashDebit = cashDebit;
    }

    public Double getPayableCredit() {
        return payableCredit;
    }

    public void setPayableCredit(Double payableCredit) {
        this.payableCredit = payableCredit;
    }

    public Double getPayableDebit() {
        return payableDebit;
    }

    public void setPayableDebit(Double payableDebit) {
        this.payableDebit = payableDebit;
    }

    public Double getReceivableCredit() {
        return receivableCredit;
    }

    public void setReceivableCredit(Double receivableCredit) {
        this.receivableCredit = receivableCredit;
    }

    public Double getReceivableDebit() {
        return receivableDebit;
    }

    public void setReceivableDebit(Double receivableDebit) {
        this.receivableDebit = receivableDebit;
    }

    public String getCompanyName() {
        return companyName;
    }

    public void setCompanyName(String companyName) {
        this.companyName = companyName;
    }

    public Timestamp getTransactionDate() {
        return transactionDate;
    }

    public void setTransactionDate(Timestamp transactionDate) {
        this.transactionDate = transactionDate;
    }
    
}
